﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Kira.Compiler.Lexer
{
    public class Word : Token
    {
        static Word()
        {
            And = new Word("&&", Tag.And);
            Or = new Word("||", Tag.Or);
            Equal = new Word("==", Tag.Equal);
            NotEqual = new Word("!=", Tag.NotEqual);
            Less = new Word("<=", Tag.Less);
            Greater = new Word(">=", Tag.Greater);
            Minus = new Word("minus", Tag.Minus);
            True = new Word("true", Tag.True);
            False = new Word("false", Tag.False);
            Temp = new Word("t", Tag.Temp);
        }

        public static Word And { get; private set; }
        public static Word Or { get; private set; }
        public static Word Equal { get; private set; }
        public static Word NotEqual { get; private set; }
        public static Word Less { get; private set; }
        public static Word Greater { get; private set; }
        public static Word Minus { get; private set; }
        public static Word True { get; private set; }
        public static Word False { get; private set; }
        public static Word Temp { get; private set; }


        public String Lexeme { get; private set; }

        public Word(String lexeme, Tag tag)
            : base(tag)
        {
            this.Lexeme = lexeme;
        }

        public override string ToString()
        {
            return this.Lexeme;
        }

        
    }
}
